package com.wangbo.basic;


public class Test {
    public static void main(String[] args) {
        circleArrayQueueTest();
    }


    /**
     * 执行结果：
     * array[0]=-2	array[1]=3	array[2]=7
     * -2
     * array[1]=3	array[2]=7
     * array[1]=3	array[2]=7	array[3]=5
     * 3
     * array[1]=3	array[2]=7	array[3]=5
     **/
    private static void circleArrayQueueTest() {
         CircleArrayQueue queue = new  CircleArrayQueue(4);
        queue.add(-2);
        queue.add(3);
        queue.add(7);

        queue.showAll();
        System.out.println(queue.pop());
        queue.showAll();
        queue.add(5);
        queue.showAll();
        System.out.println(queue.peek());
        queue.showAll();
    }
}
